package echat.future.cn.echat.my.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import echat.future.cn.echat.R;
import echat.future.cn.echat.my.bean.IntimateBean;
import echat.future.cn.echat.my.utils.ImageLoadUtils;

/**
 * 亲密的适配器
 * @author 86936
 */
public class IntimvateAdapter extends BaseQuickAdapter<IntimateBean,BaseViewHolder> {
    public IntimvateAdapter(@Nullable List<IntimateBean> data) {
        super(R.layout.item_intimate_list,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, IntimateBean item) {
        ImageLoadUtils.loadImage(mContext,item.getUser_avatar(),helper.getView(R.id.head));
        helper.setText(R.id.name,item.getUsername())
                .setText(R.id.level,item.getLevel() == null?"LV.0":("LV."+item.getLevel()))
                .setVisible(R.id.zs,item.getUser_role() !=1)
        .setText(R.id.number,item.getClose_num());
    }
}
